package com.kim.bookshop.user.dao;

import java.util.List;

import com.kim.bookshop.user.bean.User;


public interface UserDao {
	
	//加载
	public User load(String uid);

	//查询所有用户
	public List<User> getList();
	
	//查询所有管理员账户
	public List<User> getAdmin();
	
	//添加用户
	public void add(User user);
	
	//删除用户
	public void  delete(String uid);
	
	//按用户名查询
	public User findByUsername(String username);
	
	//按邮箱查询
	public User findByEmail(String email);
	
	//按激活码查询用户
	public User findByCode(String code);
	
	//修改指定用户得状态
	public void updateState(String uid,int state);
	
	//管理员登录
	public User adminLogin(String username);
	
	//修改用户信息
	public void updatemsg(User user);
	
	//禁用某用户
	public void kill(String uid);
	
	//启用
	public void restart(String uid);
}
